.host {
  position: relative;
  inline-size: 100%;
  block-size: 100%;
}

.in {
  position: relative;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  inline-size: 100%;
  min-block-size: 100%;
}

.centered {
  box-sizing: border-box;
  display: flex;
  flex: 1 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* stylelint-disable selector-max-universal */

/* stylelint-disable-next-line selector-pseudo-class-disallowed-list */
.centered :global(.vkuiInternalPanelHeader--static) + * {
  margin-block-start: var(--vkui_internal--panel_header_height);
}

/* stylelint-disable-next-line selector-pseudo-class-disallowed-list */
.sizeXCompact .centered :global(.vkuiInternalPanelHeader--sep) + * {
  margin-block-start: calc(var(--vkui_internal--panel_header_height) + 5px);
}

@media (--sizeX-compact) {
  /* stylelint-disable-next-line selector-pseudo-class-disallowed-list */
  .sizeXNone .centered :global(.vkuiInternalPanelHeader--sep) + * {
    margin-block-start: calc(var(--vkui_internal--panel_header_height) + 5px);
  }
}

/* stylelint-disable-next-line selector-pseudo-class-disallowed-list */
.sizeXRegular .centered :global(.vkuiInternalPanelHeader--sep) + * {
  margin-block-start: calc(var(--vkui_internal--panel_header_height) + 16px);
}

@media (--sizeX-regular) {
  /* stylelint-disable-next-line selector-pseudo-class-disallowed-list */
  .sizeXNone .centered :global(.vkuiInternalPanelHeader--sep) + * {
    margin-block-start: calc(var(--vkui_internal--panel_header_height) + 16px);
  }
}

/* stylelint-enable selector-max-universal */

/**
 * CMP:
 * View
 */
/* stylelint-disable-next-line selector-pseudo-class-disallowed-list */
:global(.vkuiInternalView--ios) .in {
  padding-block: 0 var(--vkui_internal--safe_area_inset_bottom);
  padding-inline: var(--vkui_internal--safe_area_inset_left)
    var(--vkui_internal--safe_area_inset_right);
}

/**
 * CMP:
 * Epic
 */
/* stylelint-disable-next-line selector-pseudo-class-disallowed-list */
:global(.vkuiInternalEpic--hasTabbar) .in {
  padding-block-end: var(--vkui_internal--tabbar_height);
  padding-block-end: calc(
    var(--vkui_internal--safe_area_inset_bottom) +
    var(--vkui_internal--tabbar_height)
  );
}

.inBefore {
  block-size: 1px;
  margin-block-end: -1px;
}

.inAfter {
  block-size: 1px;
  margin-block-start: -1px;
}

.modeNone .in,
.modePlain .in {
  background: var(--vkui--color_background_content);
}

.modeCard .in {
  background: var(--vkui--color_background);
}

@media (--sizeX-regular) {
  .modeNone .in {
    background: var(--vkui--color_background);
  }
}

.disableBackground .in {
  background: transparent;
}
